
<script setup>
import { cache, common } from '@utils'
import { useRouter } from 'vue-router'
import store from '@store'

const router = useRouter()
// let token = cache.get(cache.key.ACCESS_TOKEN)
// if (token) {
//     common.toLogin()
// } else {
    let routers = store.state.app.mainRoutes
    let path = '/dashboard'
    if (routers && routers.length > 0) {
        let route = routers[0]
        path = route.path
        if (route.children && route.children.length > 0) {
            path = route.path + '/' + route.children[0].path
        }
    }
    //返回第一个路由
    router.push({ path })
// }
</script>

<template>
    <div class="flex-column-align-center bgcolor-white height100">
        <el-skeleton :rows="5" animated />
    </div>
</template>